<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>{$seo_title}</title>
    <meta name="author" content="YzmCMS内容管理系统">
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
    <link href="{STATIC_URL}css/yzm-common.css" rel="stylesheet" type="text/css" />
    <link href="{STATIC_URL}css/yzm-style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{STATIC_URL}js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="{STATIC_URL}js/yzm-front.js"></script>
    <script type="text/javascript" src="{STATIC_URL}js/jquery.qqFace.js"></script>
    <script type="text/javascript" src="{STATIC_URL}plugin/layer/layer.js"></script>
</head>

<body>
    {m:include "index","header"}
    <div class="yzm-main-left yzm-box-left">
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>{get_catname($catid)}</h2>
                <span class="yzm-title-right">
                    当前位置：{get_location($catid)}
                </span>
            </div>
            <div class="yzm-content-container">
                <h1>{$title}</h1>
                <div class="yzm-content-info">
                    <span>更新时间：{date('Y-m-d H:i:s',$updatetime)}</span>
                    <span>编辑：{$nickname} </span>
                    <span>浏览：{$click}</span>
                </div>
                <div class="yzm-down-msg">
                    <img src="{get_thumb($thumb)}" title="{$title}" alt="{$title}" class="pro_img">
                    <ul>
                        <li><strong>更新日期:</strong> {date('Y-m-d H:i:s',$updatetime)} </li>
                        <li><strong>软件大小:</strong> {$filesize} </li>
                        <li><strong>运行环境:</strong> {$systems} </li>
                        <li><strong>软件授权:</strong> {$copytype} </li>
                        <li><strong>软件类型:</strong> {$classtype} </li>
                        <li><strong>软件语言:</strong> {$language} </li>
                        <li><strong>软件版本:</strong> {$version} </li>
                        <li><strong>评分等级:</strong> {$stars} </li>
                    </ul>
                </div>
                <div class="clearfix"></div>
                <div class="yzm-content">
                    <h2>软件介绍</h2>
                    {if $allow_read}
                    {$content}
                    {else}
                    <p class="yzm-content-read-tips">阅读此内容需要您支付<span>{$readpoint}</span>{if $paytype==1}点积分{else}元{/if}，<a href="{$pay_url}">点击支付</a></p>
                    {/if}
                </div>
                <div class="yzm-content-tag">
                    {m:centent_tag modelid="$modelid" id="$id" limit="10"}
                    {loop $data $v}
                    <a href="{tag_url($v['id'])}" target="_blank">{$v[tag]}</a>
                    {/loop}
                </div>
            </div>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-content-box yzm-down-url">
            <div class="yzm-title">
                <h2>下载地址</h2>
            </div>
            <ul>
                <li>
                    {if $allow_read}
                    <a href="{$down_url}" target="_blank">{$title}</a>
                    {else}
                    <a href="{$pay_url}">点击支付 <span>{$readpoint}</span> {if $paytype==1}点积分{else}元{/if}后，方可显示下载地址</a>
                    {/if}
                </li>
            </ul>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-content-box yzm-text-list">
            <div class="yzm-title">
                <h2>相关软件</h2>
            </div>
            <ul>
                {m:relation field="title,url,color,updatetime" modelid="$modelid" id="$id" limit="5"}
                {loop $data $v}
                <li>
                    <span class="yzm-date">{date('Y-m-d', $v['updatetime'])}</span>
                    <a href="{$v[url]}" title="{$v[title]}" target="_blank">{title_color($v['title'], $v['color'])}</a>
                </li>
                {/loop}
            </ul>
        </div>
        <div class="yzm-line"></div>
        <!-- 评论区开始 -->
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>文章评论</h2>
            </div>
            <div class="yzm-comment-box">
                <div class="yzm-comment-form">
                    <form action="{U('comment/index/init')}" method="post" onsubmit="return check_comm(this)">
                        <input type="hidden" name="modelid" value="{$modelid}">
                        <input type="hidden" name="catid" value="{$catid}">
                        <input type="hidden" name="id" value="{$id}">
                        <input type="hidden" name="title" value="{$title}">
                        <input type="hidden" name="url" value="{$url}">
                        <textarea class="textarea" id="content" name="content" placeholder="我来说两句~"></textarea>
                        <p>
                            <input type="submit" class="yzm-comment-submit" name="dosubmit" value="提交"><span class="emotion">表情</span>
                            {if $site['comment_code']}
                            <span class="yzm-comment-code"><img src="{U('api/index/code')}" onclick="this.src=this.src+'?'" title="看不清？点击更换"><input type="text" name="code" placeholder="请输入验证码" required="required"></span>
                            {/if}
                        </p>
                    </form>
                </div>
            </div>
            <div class="yzm-comment-list-box">
                {m:comment_list modelid="$modelid" catid="$catid" id="$id" limit="20"}
                <div class="yzm-comment-list-top">共 {get_comment_total($id, $catid, $modelid)} 条评论，<a href="{U('comment/index/more', array('sign'=>$modelid.'_'.$id))}" target="_blank">查看全部</a></div>
                <div class="yzm-comment-list-body">
                    <ul>
                        {loop $data $v}
                        <li>
                            <a class="user_pic" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank"><img src="{if !empty($v['userpic'])}{$v[userpic]}{else}{STATIC_URL}images/default.gif{/if}" height="35" width="35"></a>
                            <div class="yzm-comm-right">
                                <a class="user_name" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank">{$v[username]}</a>
                                <p>{nl2br($v['content'])}</p>
                                <p><span class="comm_time">{date('Y-m-d H:i:s',$v['inputtime'])}</span> <a href="javascript:toreply('{$v[id]}');" class="comm_a">回复</a></p>
                                <div id="rep_{$v[id]}" class="none">
                                    <form action="{U('comment/index/init')}" method="post" onsubmit="return check_rep(this)">
                                        <input type="hidden" name="modelid" value="{$modelid}">
                                        <input type="hidden" name="catid" value="{$catid}">
                                        <input type="hidden" name="id" value="{$id}">
                                        <input type="hidden" name="title" value="{$title}">
                                        <input type="hidden" name="url" value="{$url}">
                                        <input type="hidden" name="reply" value="{$v[id]}">
                                        <input type="hidden" name="reply_to" value="{$v[username]}">
                                        <textarea name="content" class="textarea textarea2" placeholder="我来说两句~"></textarea>
                                        {if $site['comment_code']}
                                        <span class="yzm-comment-reply-code"><img src="{U('api/index/code')}" onclick="this.src=this.src+'?'" title="看不清？点击更换"><input type="text" name="code" placeholder="请输入验证码" required="required"></span>
                                        {/if}
                                        <input type="submit" class="yzm-comment-submit static" name="dosubmit" value="提交">
                                    </form>
                                </div>
                            </div>
                        </li>
                        {/loop}
                        {if empty($data)}<li>这篇文章还没有收到评论，赶紧来抢沙发吧~</li>{/if}
                    </ul>
                </div>
            </div>
        </div>
        <!-- 评论区结束 -->
    </div>
    <div class="yzm-main-right">
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>点击排行</h2>
            </div>
            <ul class="yzm-ranking">
                {m:hits field="title,url,color,inputtime" catid="$catid" limit="10" cache="3600"}
                {loop $data $k=>$v}
                {php $k=$k+1;}
                <li><em>{$k}</em><span class="date">{date('m-d',$v['inputtime'])}</span><a href="{$v[url]}" title="{$v[title]}" target="_blank">{title_color($v['title'], $v['color'])}</a></li>
                {/loop}
            </ul>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>文章归档</h2>
            </div>
            <ul class="yzm-like-list">
                {m:content_archives modelid="$modelid" type="2" limit="10" cache="3600"}
                {loop $data $v}
                <li><a href="{U('search/index/archives',array('pubtime'=>$v['inputtime']))}" target="_blank">{$v[pubtime]}({$v[total]})</a></li>
                {/loop}
            </ul>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-list-advertise">
            <a href="http://www.yzmcms.com" target="_blank">
                <p>PC+WAP+微信三站合一</p>
                <p class="yzm-ad">YzmCMS开源CMS</p>
            </a>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>评论排行榜</h2>
            </div>
            <ul class="yzm-comment-list">
                {m:comment_ranking modelid="1" limit="10" cache="3600"}
                {loop $data $v}
                <li><a href="{$v[url]}" title="{$v[title]}">{$v[title]}</a></li>
                {/loop}
            </ul>
        </div>
        <div class="yzm-line"></div>
        <div class="yzm-content-box">
            <div class="yzm-title">
                <h2>热门标签</h2>
            </div>
            <ul class="yzm-tag-list">
                {m:tag field="id,tag,total" limit="30"}
                {loop $data $v}
                <li><a href="{tag_url($v['id'])}" target="_blank">{$v[tag]}({$v[total]})</a></li>
                {/loop}
            </ul>
        </div>
    </div>
    <script type="text/javascript">
    $(function() {
        $('.emotion').qqFace({
            path: '{STATIC_URL}images/face/'
        });
    });
    </script>
    {m:include "index","footer"}